package com.ynu.yx.chatroleai.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ynu.yx.chatroleai.model.AICharacter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AICharacterDao extends BaseMapper<AICharacter> {

    @Select("select * from ai_characters where name = #{name} LIMIT 1")
    AICharacter selectOneByName(String name);

    @Select("select * from ai_characters where ai_id = #{aiId} LIMIT 1")
    AICharacter selectOneByAiId(Long aiId);

}
